import QtQuick 2.10
import QtQuick.Window 2.14

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    Rectangle {
        id: window
        anchors.fill: parent
        color: "#262626"

        Row {
            anchors.centerIn: parent;
            spacing: 30
//            Card {id:a; source: "9_club.png"; angle: 180; yAxis: 1 }
//            Card { source: "5_heart.png"; angle: 540; xAxis: 1 }

            FlopCard{id:h1;width:140;height: 200;lineColor:"#262626"}
            FlopCard{id:h2;width:140;height: 200;lineColor:"#262626"}
            FlopCard{id:m1;width:140;height: 200;lineColor:"#262626"}
            FlopCard{id:m2;width:140;height: 200;lineColor:"#262626"}
            FlopCard{id:s1;width:140;height: 200;lineColor:"#262626"}
            FlopCard{id:s2;width:140;height: 200;lineColor:"#262626"}
        }

        Timer{
            interval: 1000
            repeat: true
            running: true
            onTriggered: {
                var date = new Date();

                h1.pageTurn(String("%1").arg(parseInt(date.getHours()/10)));
                h2.pageTurn(String("%1").arg(parseInt(date.getHours()%10)));
                m1.pageTurn(String("%1").arg(parseInt(date.getMinutes()/10)));
                m2.pageTurn(String("%1").arg(parseInt(date.getMinutes()%10)));
                s1.pageTurn(String("%1").arg(parseInt(date.getSeconds()/10)));
                s2.pageTurn(String("%1").arg(parseInt(date.getSeconds()%10)));
            }
        }
    }

}
